<!-- /* Description for file.
 * 项目附件
 * @copyright     Copyright 2008-2010, PHInfo Services Inc. (http://www.phinfoservices.com)
 * @package       ues
 * @subpackage    ues/app/views/projectmanagements
 * @since         ues
 * @version       V0.0.1
 * @modifiedby    张海杰2011年0712
 * @lastmodified  张海杰2011年0712
 */
 -->

 <?php
echo $html->css ( 'tab' );
echo $javascript->link('jquery-1.4.2');
echo $javascript->link('checkedAll');
?>
<script type="text/javascript">
	function getDelStr() {
		var delArr = $("#f2 :checkbox:checked");
		if(delArr.length==0)
		{
			alert("请选择你要删除的项!");
			return;
		}
		if(!confirm("确定删除?"))
		{
				return;
		}
		var str = "";
		for(var i=0;i<delArr.length;i++) {
			var del = delArr[i].value;
			if(del!="")
			{
				str += del;
				str += "/";
			}
		}
		//window.alert(str);
		$("#delStr").val(str);
		$("#f2").submit();
	}
</script>
<script type="text/javascript">
	function mycheck() {
		$("#f2").submit();	
	}
	$(function()
			{
				$("#deletefile").click(function(){
					file = $("#ff");   
					file.after(file.clone());   
					file.remove(); 
				});
				$("#addfile").click(function(){
					file=$("#ff").val();
					if(file=="")
					{
						alert("附件不能为空");
					}
					else
					{
						$("#f22").submit();
					}
				});	
			});
</script>
<!-- 当前位置-->
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Projectmanagements');//一级目录
										   echo '>';echo __('Projectmanagements');//二级目录
										   echo '>';echo __('Candidate Management');//三级目录
										   echo '>';
										   ?>
									<?php echo $html->tag('span', __('Candidate UpResumeReport',true));//当前操作地用span加粗?> 						  
		</td>
	</tr>
</table>
</div>
<!-- 当前位置-->
<div class="tabflex">


	<?php echo $form->create('Attachment',array('action'=>"resumesave/$id",'type'=> 'post','enctype'=>'multipart/form-data','id'=>'f22'));?>
<div class="tabflex" style="width:70%;">		
	<?php echo $form->file('Attachment',array('label'=>false,'size'=>50,'name'=>'Attachment','id'=>'ff','class'=>'TextBoxEL'));?> 
</div>
<div class="tabflex" style="width:10%;">
	<?php echo $form->button('确定上传',array('class'=>'oksubmit','id'=>'addfile'));?>
</div>
	<?php echo $form->end();?>
	
	<?php echo $form->create('Attachment',array('action'=>"deleteSomeresume/$id",'type'=> 'post','id'=>'f2'));?>
	<?php echo $form->hidden('delStr',array('name'=>'id','id'=>'delStr'));?>
	<div class="tabflex" style="width:10%;">
		<?php echo $form->button('删除',array('class'=>'deletebutton','onclick'=>'getDelStr()'));?>
	</div>	
	<!--<a onclick=getDelStr()><?php //echo $html->image('delete.gif', array('alt' =>  __('Delete', true),'border'=>'0','title'=> '删除','onclick'=>'getDelStr()'));?>&nbsp;删除附件</a>
	-->



<div id="nav1" style="width:97%">
<table width="100%" cellpadding="0" cellspacing="0" class="tab1">
	<tr>
		<th width="70px"><?php echo $form->checkbox('',array('id'=>'checkedAll'));?></th>
		<th ><?php echo __('文件名');?></th>
		<th ><?php echo __('上传人');?></th>
		<th ><?php echo __('上传时间');?></th>
	</tr>
	<!-- Here's where we loop through our $Notes array, printing out post info --> 
	
	<?php 
	foreach ($attachments as $datas): 
	?>
		<tr class=normal onmouseover='this.className= "over " '
			onmouseup='this.className= "over " '
			onmouseout='this.className= "normal " '>
			<td>
<!-- 批量删除选择 -->				
			<?php echo $form->checkbox($datas['Resumereport']['id'], array('value' => $datas['Resumereport']['id'],'name'=>'checkbox_name'));?>
			</td>
			<td title="<?php echo $datas['Resumereport']['name']; ?>">
			<?php 	if($datas['Resumereport']['name']!=null)
					{	
						$dir="files-resumereportfiles";
						echo $html->link($datas['Resumereport']['name'],
							'/recruitpositions/down1/'.$dir.'/'.$datas['Resumereport']['name']);
					}
			?> 
			</td>
			<td title="<?php echo $datas['Resumereport']['creater']; ?>"><?php echo $datas['Resumereport']['creater']; ?></td>
			<td title="<?php echo $datas['Resumereport']['created']; ?>"><?php echo $datas['Resumereport']['created']; ?></td>
		</tr> 
	<?php endforeach; ?>  
</table>
</div>
<?php echo $form->end();?>
</div>

